package com.example.springbootmybatispage.mapper;

import com.example.springbootmybatispage.model.Employee;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface EmployeeMapper {


    Employee getById(Long id);

    /**
     * 走rowbounds
     *
     * @return
     */
    List<Employee> selectPageByRowBounds(RowBounds rowBounds);


    /**
     * 走pageHelper插件的查询
     * @return
     */
    List<Employee> selectPageByPageHelper();


    /**
     * 根据用户名模糊查询的sql
     * @param rowBounds
     * @param username
     * @return
     */
    List<Employee> selectByUsernameLike(RowBounds rowBounds, String username);


    /**
     * 根据email模糊查询
     * @param email
     * @return
     */
    List<Employee> selectByEmailLike(String email);
}
